#include <iostream>
#include <math.h>
#include <map>
#define int long long
using namespace std;


int Fpow(int a,int n){
	if(n < 0)
		return -1;
	int ans=1;
	while(n){
		if(n & 1)
			ans = ans*a;
		a = a*a;
		n = n>>1;
	}
	return ans;
}


signed main(){
	int n,n2,ai_max=0;
	bool ans=true;
	map<int,int> m;
	cin>>n;
//	n2 = Fpow(2,n);
	n2 = pow(2,n);
	for(int i=0;i<n2;i++){
		int l;
		cin>>l;
		ai_max = max(l,ai_max);
		m[l]++;
	}
	n2 = 1;
	int sum=0;
	if(m[ai_max] > 1)
		n2 = -1;
	for(int i=ai_max+1;i>=1;i--){
		if(n2 < m[i]){
			ans = false;
			break;
		}
		sum += m[i];
		n2 = sum*2;
	}
	if(ans)
		cout<<"Yes";
	else
		cout<<"No";
	return 0;
}
